wayland/glcontext: Sync surface state before swapping buffers
authorJonas Ådahl <jadahl@gmail.com>
Wed, 21 Mar 2018 06:01:58 +0000 (14:01 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 21 Mar 2018 06:14:20 +0000 (14:14 +0800)
commit1d5d46ff29c7e5c012bf7dd571304cc54fb95bed
tree7ea71d35d3b82582bece1eedcd8c93286b10e760
parent2a4ffd4a596fb3790683abd0747b1c6f53fb4a3f
wayland/glcontext: Sync surface state before swapping buffers

A side effect of eglSwapBuffers* is the EGL implementation calling
wl_surface_commit() on the corresponding Wayland surface. Thus, before
swapping buffers, we must synchronize the surface state (e.g. opaque
region, window geometry, etc) that changed since the last buffer swap.
Prior to this commit, this was done after eglSwapBuffers*, causing the
surface state to always correspond to the previous buffer state. As of
this commit this is now done before swapping the buffers, thus before
wl_surface_commit().
gdk/wayland/gdkglcontext-wayland.c